﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/Site.Master" AutoEventWireup="true"
	CodeBehind="Trainings.aspx.cs" Inherits="Hematology.UserSite.Trainings" %>

<%@ Import Namespace="Hematology.Data" %>
<%@ Import Namespace="Hematology.Tools" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphHeadNews" runat="server">
	<hmt:PageTitle runat="server" ID="ptTitle" Text='<%$ Resources:UserSite, resTopicTrainings %>' />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphBody" runat="server">
	<div class="container2">
		<div id="left-div">
			<asp:MultiView runat="server" ID="mvTrainings">
				<asp:View runat="server" ID="vTrainingsListFull">
					<asp:Repeater runat="server" ID="rptTrainingsFull">
						<ItemTemplate>
							<div class="post-wrapper">
								<div class="post">
									<div class="homepost-left">
										<div class="thumbnailwrap">
											<asp:HyperLink ID="hlReadFull" runat="server" Text='<%$ Resources:UserSite, resReadFull %>'
												NavigateUrl='<%# string.Format("/Trainings.aspx?ct={0}&id={1}", ConvertToType(Eval("ContentTypeCode")), Eval("SiteContentId")) %>' />
										</div>
									</div>
									<div class="homepost-right">
										<h2 class="titles">
											<asp:HyperLink runat="server" ID="hlViewTrainings" Text='<%# Eval("Title") %>' NavigateUrl='<%# string.Format("/Trainings.aspx?ct={0}&id={1}", CurrentContentType, Eval("SiteContentId")) %>' />
										</h2>
										<asp:Repeater runat="server" ID="rptContentAttach" OnItemCommand="rptContentAttach_ItemCommand"
											DataSource='<%# ((SiteContent)Container.DataItem).FileAttachements %>' Visible='<%# ((SiteContent)Container.DataItem).FileAttachements.Count > 0 && String.IsNullOrEmpty(((SiteContent)Container.DataItem).Content) %>'>
											<HeaderTemplate>
												<hr />
											</HeaderTemplate>
											<ItemTemplate>
												<div class="contentAttachBlock">
													<div class="contentAttachIcon">
														<asp:LinkButton runat="server" ID="btnOpenDocumentIcon" CssClass='<%# PageHelper.GetAttachIconClass(Eval("DocumentName")) %>'
															Text='<%$ Resources:UserSite, resWhitespace %>' />
													</div>
													<div class="contentAttachFileName">
														<asp:LinkButton runat="server" ID="btnOpenDocument" Text='<%# string.Format("{0} ({1})", Eval("DocumentName"), PageHelper.GetRoundedFileSize(Eval("DocumentSize"))) %>'
															CommandName="OpenAttach" CommandArgument='<%# Eval("AttachId") %>' />
													</div>
												</div>
											</ItemTemplate>
											<FooterTemplate>
												<hr />
												<div style="clear: both;">
												</div>
											</FooterTemplate>
										</asp:Repeater>
										<p>
											<asp:Label ID="lblTeaser" runat="server" Text='<%# PageHelper.GetTeaser(Eval("Content")) %>' />
										</p>
										<div style="clear: both;">
										</div>
									</div>
								</div>
							</div>
						</ItemTemplate>
					</asp:Repeater>
				</asp:View>
				<asp:View runat="server" ID="vTrainingsInfo">
					<asp:FormView runat="server" ID="fvTrainings">
						<ItemTemplate>
							<div class="post-wrapper">
								<div class="post">
									<div class="homepost-left">
										<div class="thumbnailwrap">
											&nbsp;
										</div>
									</div>
									<div class="homepost-right">
										<h2 class="titles">
											<asp:HyperLink runat="server" ID="hlViewTrainings" Text='<%# Eval("Title") %>' NavigateUrl='<%# string.Format("/Trainings.aspx?ct={0}&id={1}", CurrentContentType, Eval("SiteContentId")) %>' />
										</h2>
										<asp:Repeater runat="server" ID="rptContentAttach" OnItemCommand="rptContentAttach_ItemCommand"
											DataSource='<%# ((SiteContent)Container.DataItem).FileAttachements %>' Visible='<%# ((SiteContent)Container.DataItem).FileAttachements.Count > 0 %>'>
											<HeaderTemplate>
												<hr />
											</HeaderTemplate>
											<ItemTemplate>
												<div class="contentAttachBlock">
													<div class="contentAttachIcon">
														<asp:LinkButton runat="server" ID="btnOpenDocumentIcon" CssClass='<%# PageHelper.GetAttachIconClass(Eval("DocumentName")) %>'
															Text='<%$ Resources:UserSite, resWhitespace %>' />
													</div>
													<div class="contentAttachFileName">
														<asp:LinkButton runat="server" ID="btnOpenDocument" Text='<%# string.Format("{0} ({1})", Eval("DocumentName"), PageHelper.GetRoundedFileSize(Eval("DocumentSize"))) %>'
															CommandName="OpenAttach" CommandArgument='<%# Eval("AttachId") %>' />
													</div>
												</div>
											</ItemTemplate>
											<FooterTemplate>
												<hr />
												<div style="clear: both;">
												</div>
											</FooterTemplate>
										</asp:Repeater>
										<p>
											<asp:Label ID="lblContent" runat="server" Text='<%# Eval("Content") %>' />
										</p>
										<div style="clear: both;">
										</div>
									</div>
								</div>
							</div>
						</ItemTemplate>
					</asp:FormView>
				</asp:View>
			</asp:MultiView>
			<div class="pagination">
				<div class="alignleft">
					<a href="#">« Older Entries</a></div>
				<div class="alignright">
				</div>
			</div>
		</div>
	</div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cphPanel" runat="server">
	<div class="sidebar-box">
		<h2>
			<asp:Label runat="server" ID="lblTrainingsListType" />
		</h2>
		<asp:MultiView runat="server" ID="mvTrainingsType">
			<asp:View runat="server" ID="vCommonTrainingsTypeList">
				<ul>
					<li>
						<asp:HyperLink runat="server" ID="hlCongress" Text='<%$ Resources:UserSite, resTopicCareer %>'
							NavigateUrl="/Trainings.aspx?ct=Career" />
					</li>
					<li>
						<asp:HyperLink runat="server" ID="hlConference" Text='<%$ Resources:UserSite, resTopicEducation %>'
							NavigateUrl="/Trainings.aspx?ct=Education" />
					</li>
					<li>
						<asp:HyperLink runat="server" ID="hlGrant" Text='<%$ Resources:UserSite, resTopicGrant %>'
							NavigateUrl="/Trainings.aspx?ct=Grant" />
					</li>
					<li>
						<asp:HyperLink runat="server" ID="hlOtherResources" Text='<%$ Resources:UserSite, resTopicOtherResources %>'
							NavigateUrl="/Trainings.aspx?ct=OtherResources" />
					</li>
				</ul>
			</asp:View>
			<asp:View runat="server" ID="vTrainingsList">
				<asp:Repeater runat="server" ID="rptTrainings">
					<HeaderTemplate>
						<ul>
					</HeaderTemplate>
					<ItemTemplate>
						<li>
							<asp:HyperLink runat="server" ID="hlTrainingsType" Text='<%# Eval("Title") %>' NavigateUrl='<%# string.Format("/Trainings.aspx?ct={0}&id={1}", CurrentContentType, Eval("SiteContentId")) %>' />
						</li>
					</ItemTemplate>
					<FooterTemplate>
						</ul>
					</FooterTemplate>
				</asp:Repeater>
			</asp:View>
		</asp:MultiView>
	</div>
</asp:Content>
